<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="com.open.thinks.todo.system.common.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Task Overview</title>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<link href="${pageContext.request.contextPath}/resource/css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<p><%=WebUtils.getCurrentUser(session)%> To-Do Tasks</p>
<a href="<c:url value="/task/add.htm"/>">Add</a>
<table border="1">
	<tr>
		<th>Task ID</th>
		<th>Subject</th>
		<th>Task Type</th>
		<th>Task Status</th>
		<th>Task Priority</th>
		<th>Owner</th>
		<th>Assignee</th>
	</tr>
	<c:forEach var="task" items="${tasks}">
    	<tr>
    		<td><a href="<c:url value="/task/${task.task_id}/edit.htm"/>">${task.task_id}</a></td>
    		<td>${task.subject}</td>
    		<td>${task.type.content}</td>
    		<td>${task.status.content}</td>
    		<td>${task.priority.content}</td>
    		<td>${task.createby}</td>
    		<td>${task.assignee}</td>
    	</tr>
	</c:forEach>
</table>
</body>
</html>